<?php foreach($branchlist as $item):?>
<div class="branch">
<table id="branch-<?= $item['branch_id']; ?>">
<tr>
<td style="width: 100%;" onclick="showDetailsBranch('<?= $item['branch_id']; ?>');">
<span class="title-branch" ><?= $item['name'];?></span>
</td>
<?php if ($this->auth->has_rights_to("add","rls",$item['branch_id'])): ?>
<td>
<img class="action" title="Add new release" style="cursor: pointer;" onclick="update_content('<?php echo site_url("release/add/".$item['branch_id']); ?>')" alt="Add Release" src="<?= base_url();?>img/add.png" />
</td>
<?php endif;
	  if ($this->auth->has_rights_to("edit","bch",$item['branch_id'])): ?>
<td>
<img class="action" title="Edit the branch" style="cursor: pointer;" onclick="update_content('<?php echo site_url("branch/edit/".$item['branch_id']); ?>')" alt="Edit Branch" src="<?= base_url();?>img/edit.png" />
</td>
<?php endif;
	  if ($this->auth->has_rights_to("delete","bch",$item['branch_id'])): ?>
<td>
<img class="action" title="Delete the branch" style="cursor: pointer;" onclick="deleteBranch(<?= $item['branch_id']; ?>);" alt="Delete Branch" src="<?= base_url();?>img/delete.png" />
</td>
<?php endif; ?>
</tr>
</table>
</div>

<div id="releaselist-<?= $item['branch_id'];?>" style="display:none;"> releases </div>
<?php endforeach;
if (count($branchlist) == 0):?>
<div class="branch">No branches for this package</div>
<?php endif; ?>

